﻿
using Fozzy.Ontology;

namespace Fozzy.Gedcom
{
    /// <summary>
    /// One family group. 
    /// </summary>
    public class Photos                                     : Enumeration<Photo>
    {
        #region States
        #endregion

        #region Properties
            //protected override IEnumerable<Photo>           Sources                 { get { return Nodes.Select(node => new Photo(new File(node).ToString()))                ; } }
            //public Photo                                    Avatar                      { get { return First                    ; } }
        #endregion

        #region Constructeur
            /// <summary>
            /// Argh : COmment on construit les Photos ?
            /// </summary>
            /// <param name="node"></param>
            public Photos(_Element node)                     : base(node.Elements("OBJE"))
            {}
        #endregion

            

            //public override void Export()
            //{
            //    base.Export()                               ;
            //    foreach(Photo photo in Instances)           photo.Export()          ;
            //}

//        //private void ExportPhotos(Person person)
//        //{
//        //    foreach (Photo photo in person.Photos)
//        //    {
//        //        WriteLine(1, "OBJE", "");
//        //        WriteLine(2, "FILE", photo.FullyQualifiedPath);
//        //    }
//        //}


//        //string[] photos;
//        //XmlNodeList list = node.SelectNodes("OBJE");
//        //photos = new string[list.Count];

//        //for (int i = 0; i < list.Count; i++)
//        //    photos[i] = GetFile(list[i]);
    }
}

